CALL DLL

This command will call a function of a loaded DLL.

  Syntax
CALL DLL DLL Number, Function Name
CALL DLL DLL Number, Function Name, [ Params ]
CALL DLL DLL Number, Function Name)
CALL DLL DLL Number, Function Name, [ Params ])
  Parameters
DLL Number
Integer
The DLL Number must be an integer value between 1 and 256
Function Name
String
The Function String is the name of the function described in the export table of the DLL
[ Params ]
Integer
You can optionally have up to 9 parameters

  Returns

This value is an integer number such as 1.

  Description

The DLL Number must be an integer value between 1 and 256. The DLL Number points to the DLL previously loaded. The Function String is the name of the function described in the export table of the DLL. You can optionally have up to 9 parameters of integer, real or string type providing the function you are calling matches the parameters exactly. You can optionally return a value of integer, real or string type providing the function exports the same type.

  Example Code
cls
print "Loading DLL..."
LOAD DLL "TestDLL.dll",1
if DLL EXIST(1)=1
print "Calling DLL Function...";
if DLL CALL EXIST(1, "?MyFunc@@YAXXZ")=1
print "okay."
CALL DLL 1, "?MyFunc@@YAXXZ"
else
print "does not exist."
endif
print "Calling DLL Function with Return Value...";
if DLL CALL EXIST(1, "?MyFunc@@YAHH@Z")=1
print CALL DLL(1, "?MyFunc@@YAHH@Z")
else
print "does not exist."
endif
print "Deleting DLL..."
DELETE DLL 1
else
print "not loaded."
endif
do
loop
end
  See also

SYSTEM Commands Menu
Index